home *** CD-ROM | disk | FTP | other *** search
- %!
- %
- % $Id: enumfonts.ps 1.2 1996/05/12 12:31:57 heinz Exp $
- %
- % (C)1996 by Heinz Wrobel
- %
- % This file may not be modified!
- %
- % HWGPOST is dedicated to Joan Thuesen, a VIP in my life.
- %
- % HWGPOST is not PD or free!
- %
- % This is a HWGPOST specific PostScript program to scan the
- % PSFONTS: dir for all font files.
- % It will generate a suitable clip to be inserted into your
- % HWGPOSTResources file to make all your fonts available to
- % the interpreter.
- %
- % Run this file from the Shell via the 'post' frontend like
- %
- % post init.ps enumfonts.ps >t:resourceclip
- %
- % Then edit the resource clip appropriately by sorting it,
- % removing duplicates and the fonts that you don't want.
- % Finally add it to your HWGPOSTResources file as needed.
- %
- % Fairly easy to set up your fonts now, isn't it?
- %
- % Heinz Wrobel
- % <heinz@hwg.muc.de>
- %
-
- /ScanFontDir
- {
- save
- exch
- /filenamebuf 256 string def
- /fontnamebuf 256 string def
- {
- dup /filename exch def
- @fontfile
- {
- dup token
- {
- dup /FontName eq
- {
- pop
- dup token
- {
- fontnamebuf cvs /fontname exch def
-
- fontname filename eq not
- {
- (\() print fontname print (\) \() print
- filename print
- (\) /Font @RegisterDiskResource\n) print
- flush
- }
- if
-
- closefile
- exit
- }
- if
- }
- {
- % Is this in fact an AFM file?
- /StartFontMetrics eq
- {
- % Yes, skip it!
- closefile
- exit
- }
- if
- }
- ifelse
- }
- {
- % No token anymore, EOF!
- exit
- }
- ifelse
- }
- loop
- }
- filenamebuf
- filenameforall
-
- restore
- } def
-
- (%PSFONTS%*) ScanFontDir
-
- %
- % EOF
- %
-